Bentley Map V8i (SELECTseries 10) Help

Creating a Lookup Table

The ability to use domain lists based on Oracle lookup tables starts with the creation or selection of a lookup table.

To create a lookup table that will be linked to the state_province column of the customers table, use the following CREATE TABLE statement:

CREATE TABLE state_province_lut (
  alpha VARCHAR2(2) CONSTRAINT state_province_pk PRIMARY
KEY,
  state VARCHAR2(20));

In this case, the table’s alpha column is linked with the state_province_code column in the customers table.

Naturally, this table needs to be populated with the appropriate values. For example using:

INSERT INTO state_province_lut
  (alpha, state) VALUES ('PA', 'Pennsylvania');


 INSERT INTO state_province_lut
  (alpha, state) VALUES ('AK', 'Alaska');


 Etc.